﻿using FluentValidation;

namespace IdentityService.Webapi.Controllers.UserAdmin
{
    public record ChangePasswordRequest(string OldPassword, string Password,string ReSetPassword);
    public class ChangePasswordRequesttValidator : AbstractValidator<ChangePasswordRequest>
    {
        public ChangePasswordRequesttValidator()
        {
            RuleFor(e => e.OldPassword).NotNull().NotEmpty().MaximumLength(50);
            RuleFor(e => e.Password).NotNull().NotEmpty().MaximumLength(50);
            RuleFor(e => e.ReSetPassword).NotNull().NotEmpty().MaximumLength(50);
        }
    }
}
